<?php

namespace common\models\wap;

use Yii;

/**
 * This is the model class for table "iliketry.wx_bind_info".
 *
 * @property integer $id
 * @property integer $member_no
 * @property string $username
 * @property string $openid
 * @property string $add_time
 * @property integer $flag
 * @property string $bind_time
 * @property string $channel
 * @property integer $channel_no
 */
class WeiXinBindInfo extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'iliketry.wx_bind_info';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['member_no', 'flag', 'channel_no'], 'integer'],
            [['add_time', 'bind_time'], 'safe'],
            [['username'], 'string', 'max' => 30],
            [['openid'], 'string', 'max' => 50],
            [['channel'], 'string', 'max' => 10],
            [['openid'], 'unique'],
            [['member_no'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'member_no' => 'Member No',
            'username' => 'Username',
            'openid' => 'Openid',
            'add_time' => 'Add Time',
            'flag' => 'Flag',
            'bind_time' => 'Bind Time',
            'channel' => 'Channel',
            'channel_no' => 'Channel No',
        ];
    }
}
